import java.util.ArrayList;
import java.util.Scanner;

public class Java007 {
    public static void main(String[] args) {
        String s;
        int num=0,letters=0,space=0,others=0;
        Scanner sc=new Scanner(System.in);
        s=sc.nextLine();//输入一行单词
        for(int i =0;i<s.length();i++){
            char c=s.charAt(i);
            if(Character.isDigit(c)){
                num++;
            }else if(Character.isLetter(c)){
                letters++;//字母
            }else if(Character.isSpaceChar(c)){
                space++;
            }else{
                others++;
            }
        }
        System.out.println("num:"+num+", letters:"+letters+", sapce:"+space+", others:"+others);
    }
}
